#include"StringPool.h"
#include"variable.h"
#include<iostream>
#include"ParseForestItem.h"
using namespace std;

ParseForestItem::ParseForestItem(){};

ParseForestItem::ParseForestItem(int s, int type, int dir, double prob){
	this->s = s;
	this->type = type;
	this->dir = dir;

	this->prob = prob;
	
	this->left = NULL;
	this->right = NULL;
}

ParseForestItem::ParseForestItem(int s, int r, int t, int type, int dir, int comp, double prob, ParseForestItem *left, ParseForestItem *right){
	this->s = s;
	this->r = r;
	this->t = t;
	this->type = type;
	this->dir = dir;
	this->comp = comp;

	this->prob = prob;

	this->left = left;
	this->right = right;
}

void ParseForestItem::copyValues(ParseForestItem *p){
	p->s = s;
	p->r = r;
	p->t = t;
	p->dir = dir;
	p->comp = comp;
	p->prob = prob;
	p->left = left;
	p->right = right;
	p->type = type;
}

bool ParseForestItem::equals(ParseForestItem *p){
	return s == p->s && t == p->t && r == p->r && dir == p->dir
				&& comp == p->comp && type == p->type;
}

ParseForestItem::~ParseForestItem(){}


